﻿<UserControl x:Class="ViewTableViewerFilter"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xml:lang="fr-FR"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" MaxHeight="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <UniformGrid Columns="2" Margin="5">
            <RadioButton Name="rbtVisibles" GroupName="TypeFiltres" Content="Visibles" HorizontalAlignment="Center" IsChecked="True"  />
            <RadioButton Name="rbtTous" GroupName="TypeFiltres"  Content="Tous" HorizontalAlignment="Center" />
        </UniformGrid>
        <ListBox Grid.Row="1" Margin="2" ItemsSource="{Binding Values}"  SelectionMode="Extended" Name="LstValues">
            <ListBox.Visibility>
                <Binding ElementName="rbtVisibles" Path="IsChecked">
                    <Binding.Converter>
                        <BooleanToVisibilityConverter />
                    </Binding.Converter>
                </Binding>
            </ListBox.Visibility>
        </ListBox>
        <ListBox Grid.Row="1" Margin="2" ItemsSource="{Binding AllValues}"  SelectionMode="Extended" Name="LstAllValues">
            <ListBox.Visibility>
                <Binding ElementName="rbtTous" Path="IsChecked">
                    <Binding.Converter>
                        <BooleanToVisibilityConverter />
                    </Binding.Converter>
                </Binding>
            </ListBox.Visibility>
        </ListBox>
        <StackPanel Margin="2" HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" >
            <Button Margin="2" Content="Valider" Padding="2" Name="BtValider" />
            <Button Margin="2" Content="Inverser" Padding="2" Name="BtInverser"/>
            <Button Margin="2" Content="Annuler" Padding="2" Name="BtAnnuler" />            
        </StackPanel>
    </Grid>
</UserControl>
